<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
<div style="width: 100%; height: 100px; background-color: green; color: yellow; font-weight: bold;">
	<h1>top</h1>


	<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>

	<sql:query var="rs" dataSource="jdbc/mysql-mybatis">
		select id, foo, bar from testdata
	</sql:query>


	<div style="width: 100%; background-color: green; color: yellow; font-weight: bold;">

		<h3>mysql data</h3>
		<c:forEach var="row2" items="${rs.rows}">
	    Foo ${row2.id} -
	    Foo ${row2.foo} -
	    Bar ${row2.bar}<br />
		</c:forEach>

		<h3>oracle data</h3>

		 <sql:query var="rs2" dataSource="jdbc/oracle-mybatis"> 
		SELECT ID, FOO, BAR FROM TESTDATA
		</sql:query>

		<c:forEach var="row2" items="${rs2.rows}">
		    Foo ${row2.id} -
		    Foo ${row2.foo} -
		    Bar ${row2.bar}-
		</c:forEach>
	</div>


	<P>
		The time on the server <br> is ${serverTime}.
	</P>



</div>

